
#include <BButton>
#include <BTextEdit>
#include <BListWidget>
#include <BAudioInput>
#include <BAudioOutput>
#include <BMainWindow>
#include <BListItem>

#include "ConfigDialog.h"
#include "WaveViewer.h"

using namespace BWE;

class MainWindow : public BMainWindow
{
public:
	MainWindow();
	~MainWindow();
	
protected:
	void slotOpen(BObject* object, const BValue& value);
	void slotSave(BObject* object, const BValue& value);
	void slotRecord(BObject* object, const BValue& value);
	void slotDelete();

	void slotPlay(BObject* object, const BValue& value);
	void slotStop(BObject* object, const BValue& value);
	void slotShowConfigDialog();
	void slotWaveItemClicked(BObject* object, const BValue& value);

	void slotAudioInput(BObject* object, const BValue& value);
	void slotAudioOutput(BObject* object, const BValue& value);

private:
	BAudioInput*		_audioInput;
	BAudioOutput*		_audioOutput;

	BButton*			_openButton;
	BButton*			_saveButton;
	BButton*			_recordButton;
	BButton*			_deleteButton;
	BListWidget*		_waveListWidget;
	WaveViewer*			_waveViewer;
	BButton*			_playButton;
	BButton*			_stopButton;
	BButton*			_configButton;
	BTextEdit*			_output;
	ConfigDialog*		_configDialog;

	BListItem*			_waveItem;
};